package com.rd.student.ruanjian.class1.duhang.Week04.New;

public class ThreadDemo {
    //等待唤醒机制
    //实现线程轮流交替执行的结果


    //创建新的线程对象
    public static void main(String[] args) {
        Cook c = new Cook();
        Foodie f = new Foodie();
       c.setName("zuo");
       f.setName("chi");

       c.start();
       f.start();
    }
}
